import React, { useCallback } from "react";
// import { useDispatch, useSelector } from "react-redux";
import { useDispatch, useSelector } from "../../kreactRedux/index";


export default function HookReactReduxPage() {
      let dispatch = useDispatch();
      let count = useSelector((store) => store.count);

      let addData = useCallback(() => {
            dispatch({ type: "ADD" });
      }, []);

      return (
            <div>
                  <h1>HookReduxPage</h1>
                  <p>{count}</p>
                  <button onClick={addData}>add</button>
            </div>
      );
}
